<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Apply extends Model
{

    use HasFactory;
    protected $fillable = [
        'visitor_id',
        'staff_id',
        'visit_date',
        'visit_time',
        'reason',
        'partners'
    ];
    public static $_status = [
        1 => '待审核', 2 => '已通过', 3 => '未通过', 4 => '已取消', 5 => '已到访', 6 => '已完成'
    ];
    public function visitor() {
        return $this->belongsTo(Visitor::class, 'visitor_id');
    }

    public function staff() {
        return $this->belongsTo(Staff::class, 'staff_id');
    }
}
